<template>
  <div>
    <mt-swipe :auto="4000">
      <mt-swipe-item v-for="(item, index) in lunbotuList" :key="index">
        <img :src="item.img" alt="轮播图">111
      </mt-swipe-item>
    </mt-swipe>

    <ul class="mui-table-view mui-grid-view mui-grid-9">
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <router-link to="/home/newslist">
          <img src="../../imgs/menu1.png">
          <div class="mui-media-body">新闻资讯</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <a href="#">
          <img src="../../imgs/menu2.png">
          <div class="mui-media-body">图片分享</div>
        </a>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <a href="#">
          <img src="../../imgs/menu3.png">
          <div class="mui-media-body">商品购买</div>
        </a>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <a href="#">
          <img src="../../imgs/menu4.png">
          <div class="mui-media-body">留言反馈</div>
        </a>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <a href="#">
          <img src="../../imgs/menu5.png">
          <div class="mui-media-body">视频专区</div>
        </a>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <a href="#">
          <img src="../../imgs/menu6.png">
          <div class="mui-media-body">联系他们</div>
        </a>
      </li>
    </ul>
  </div>
</template>

<script>
import { Toast } from "mint-ui";
export default {
  data() {
    return {
      lunbotuList: []
    };
  },
  methods: {
    getImgs() {
      this.$http.get("http://vue.studyit.io/api/getlubo").then(result => {
        if (result.body.status === 0) {
          this.lunbotuList = result.body.message;
        } else {
          Toast("数据获取失败");
        }
      });
    }
  }
};
</script>

 <style lang="less">
.mint-swipe {
  height: 200px;
  .mint-swipe-item {
    //  交集选择器，用于选中交集的部分，获取元素中的第几个元素
    &:nth-child(1) {
      background-color: aqua;
    }
    &:nth-child(2) {
      background-color: blanchedalmond;
    }
    &:nth-child(3) {
      background-color: chocolate;
    }
    img {
      height: 100%;
      width: 100%;
    }
  }
}

.mui-grid-view.mui-grid-9 {
  background-color: aliceblue;
  img {
    width: 70px;
    height: 73px;
  }
}
.mui-table-view.mui-grid-view .mui-table-view-cell {
  background-color: aliceblue;
}
</style>
 
